package com.rightsidetech.activity.entity;

import java.io.Serializable;

/**
 * act_activity_mall_type_gift
 * @author 
 */
public class ActActivityMallTypeGift implements Serializable {
    /**
     * 主键
     */
    private Long id;

    /**
     * 活动分类表id
     */
    private Long activityMallTypeId;

    /**
     * 换购商品id
     */
    private Long giftId;

    /**
     * 商品数量
     */
    private Integer num;

    private static final long serialVersionUID = 1L;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getActivityMallTypeId() {
        return activityMallTypeId;
    }

    public void setActivityMallTypeId(Long activityMallTypeId) {
        this.activityMallTypeId = activityMallTypeId;
    }

    public Long getGiftId() {
        return giftId;
    }

    public void setGiftId(Long giftId) {
        this.giftId = giftId;
    }

    public Integer getNum() {
        return num;
    }

    public void setNum(Integer num) {
        this.num = num;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        ActActivityMallTypeGift other = (ActActivityMallTypeGift) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getActivityMallTypeId() == null ? other.getActivityMallTypeId() == null : this.getActivityMallTypeId().equals(other.getActivityMallTypeId()))
            && (this.getGiftId() == null ? other.getGiftId() == null : this.getGiftId().equals(other.getGiftId())
            && (this.getNum() == null ? other.getNum() == null:this.getNum().equals(other.getNum())));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getActivityMallTypeId() == null) ? 0 : getActivityMallTypeId().hashCode());
        result = prime * result + ((getGiftId() == null) ? 0 : getGiftId().hashCode());
        result = prime * result + ((getNum() == null) ? 0: getNum().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", activityMallTypeId=").append(activityMallTypeId);
        sb.append(", giftId=").append(giftId);
        sb.append(", num = ").append(num);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}